package com.sc.nft.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sc.nft.entity.UserCoupons;
import com.sc.nft.entity.dto.UserCouponsDTO;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * 用户优惠券(Mapper)
 *
 * @author liGen
 * @version 1.0
 * @date 2023/12/5 4:22 下午
 */
public interface UserCouponsMapper extends BaseMapper<UserCoupons> {

    /**
     * 获取用户购买商品的优惠券
     *
     * @param userId
     * @param productId
     * @return
     */
    List<UserCouponsDTO> getUserCanCoupons(@Param("userId") Long userId, @Param("productId") Long productId, @Param("orderPrice") BigDecimal orderPrice);
}
